package com.wei.czz.common.vo.annex;

import com.wei.czz.common.jsr303.group.Save;
import com.wei.czz.common.jsr303.group.Update;
import com.wei.czz.common.tool.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2024-01-18 17:43:54
 * className: AnnexConfigJsonVo
 * version: 1.0
 * description:
 */
@Getter
@Setter
public class AnnexConfigJsonVo extends BaseEntity {

    /**
     * 附件列表
     */
    @NotNull(message = "字段附件列表不能为空", groups = { Save.class, Update.class })
    @Size(min = 1, message = "字段附件列表不能为空", groups = { Save.class, Update.class })
    @Valid
    private List<AnnexConfigFieldVo> fieldList;

    /**
     * 条件列表
     */
    @NotNull(message = "字段条件列表不能为空", groups = { Save.class, Update.class })
    @Valid
    private List<AnnexConfigConditionVo> conditionList;

    /**
     * 条件表达式
     */
    private String expression;

}
